//PSRM Replication File - Mobilizing Voters with Aggressive Metaphors

//Study 1
use "TESS Data.dta", clear
set more off

//Variable Coding

//Treatment: 1=aggressive, 0=non-aggressive
gen viol=ASSIGN_VIG
recode viol 1=1 2=0

//Participation Motives
gen electattn=Q2
recode electattn 1=1 2=.75 3=.5 4=.25 5=0 else=.5

gen pidstren=xparty7
recode pidstren 1 7=1 2 6=.67 3 5=.33 else=0

alpha pidstren electattn, gen(commitment)


//Trait Aggression (independent variable)
//12-item index, excludes any who miss more than 1 of the 3-item sub-indices
gen blows=Q1_1
recode blows 1=1 2=.8 3=.6 4=.4 5=.2 6=0 else=.
gen blowsmiss=blows
recode blowsmiss .=1 else=0
gen hit=Q1_2
recode hit 1=1 2=.8 3=.6 4=.4 5=.2 6=0 else=.
gen hitmiss=hit
recode hitmiss .=1 else=0
gen threaten=Q1_3
recode threaten 1=1 2=.8 3=.6 4=.4 5=.2 6=0 else=.
gen threatenmiss=threaten
recode threatenmiss .=1 else=0
recode blows .=0
recode hit .=0 
recode threaten .=0
gen paggmiss=(blowsmiss+hitmiss+threatenmiss)
gen paggress=(blows+hit+threaten)/(3-paggmiss) if paggmiss<2
gen pagg_2=paggress
recode pagg_2 0=0 .01/.31=.5 .32/1=1
gen pagg_3=paggress
recode pagg_3 .=. 0=0 else=1

gen disagree=Q1_4
recode disagree 1=1 2=.8 3=.6 4=.4 5=.2 6=0 else=.
gen disagreemiss=disagree
recode disagreemiss .=1 else=0
gen arguedis=Q1_5
recode arguedis 1=1 2=.8 3=.6 4=.4 5=.2 6=0 else=.
gen arguedismiss=arguedis
recode arguedismiss .=1 else=0
gen argue=Q1_6
recode argue 1=1 2=.8 3=.6 4=.4 5=.2 6=0 else=.
gen arguemiss=argue
recode arguemiss .=1 else=0
recode disagree .=0
recode arguedis .=0
recode argue .=0
gen vaggmiss=(disagreemiss+arguedismiss+arguemiss)
gen vaggress=(disagree+arguedis+argue)/(3-vaggmiss) if vaggmiss<2

gen temper=Q1_7
recode temper 1=1 2=.8 3=.6 4=.4 5=.2 6=0 else=.
gen tempermiss=temper
recode tempermiss .=1 else=0
gen handle=Q1_8
recode handle 1=1 2=.8 3=.6 4=.4 5=.2 6=0 else=.
gen handlemiss=handle
recode handlemiss .=1 else=0
gen flare=Q1_9
recode flare 1=1 2=.8 3=.6 4=.4 5=.2 6=0 else=.
gen flaremiss=flare
recode flaremiss .=1 else=0
recode temper .=0
recode handle .=0 
recode flare .=0
gen aaggmiss=(tempermiss+handlemiss+flaremiss)
gen aaggress=(temper+handle+flare)/(3-aaggmiss) if aaggmiss<2

gen raw=Q1_10
recode raw 1=1 2=.8 3=.6 4=.4 5=.2 6=0 else=.
gen rawmiss=raw
recode rawmiss .=1 else=0
gen breaks=Q1_11
recode breaks 1=1 2=.8 3=.6 4=.4 5=.2 6=0 else=.
gen breaksmiss=breaks
recode breaksmiss .=1 else=0
gen bitter=Q1_12
recode bitter 1=1 2=.8 3=.6 4=.4 5=.2 6=0 else=.
gen bittermiss=bitter
recode bittermiss .=1 else=0
recode raw .=0 
recode breaks .=0
recode bitter .=0
gen haggmiss=(rawmiss+breaksmiss+bittermiss)
gen haggress=(raw+breaks+bitter)/(3-haggmiss) if haggmiss<2

gen aggmiss=(paggmiss+vaggmiss+aaggmiss+haggmiss)
gen aggress=(paggress+vaggress+aaggress+haggress)/4 if paggmiss<2 & vaggmiss<2 & aaggmiss<2 & haggmiss<2
recode blows 0=. if blowsmiss==1
recode hit 0=. if hitmiss==1
recode threaten 0=. if threatenmiss==1
recode disagree 0=. if disagreemiss==1
recode arguedis 0=. if arguedismiss==1
recode argue 0=. if arguemiss==1
recode temper 0=. if tempermiss==1
recode handle 0=. if handlemiss==1
recode flare 0=. if flaremiss==1
recode raw 0=. if rawmiss==1
recode breaks 0=. if breaksmiss==1
recode bitter 0=. if bittermiss==1

//Interaction Terms for IVs
gen aggressxcommitment=aggress*commitment
gen violxcommitment=viol*commitment
gen violxaggress=viol*aggress
gen violxaggxcommit=viol*aggress*commitment


gen aggressxelectattn=aggress*electattn
gen violxelectattn=viol*electattn
gen violxaggxelectattn=viol*aggress*electattn

gen aggressxpidstren=aggress*pidstren
gen violxpidstren=viol*pidstren
gen violxaggxpidstren=viol*aggress*pidstren

//Dependent Variables - Voting, other campaign participation
gen vote=Q9
recode vote 1=. 2=1 3=.75 4=.5 5=.25 6=0 else=.
//Q9=1 is the "not eligible" choice

gen contrib=Q10
recode contrib 1=1 2=.75 3=.5 4=.25 5=0 else=.

//Forcefulness evaluation
gen forceful=Q8
recode forceful 1=1 2=.75 3=.5 4=.25 5=0 else=.5

//Descriptive Statistics  
//Demographics - Gender, race, age (p. 8-9)
tab PPGENDER
tab PPETHM
su PPAGE

//Dependent Variables (p. 10)
su vote
su contrib

//Indepdendent Variables
//Trait Aggression (p. 11)
alpha blows hit threaten disagree arguedis argue temper handle flare raw breaks bitter
su aggress
tab aggress

//Participation Motives (p. 12)
alpha pidstren electattn
su commitment

//Controls
gen edu=PPEDUCAT
recode edu 1=0 2 3=.5 4=1 else=.

gen income=PPINCIMP
recode income 15 16 17 18 19=1 12 13 14=.67 11 10 9 8=.33 1 2 3 4 5 6 7=0

gen white=PPETHM
recode white 1=1 2 3 4 5=0 else=.

gen fem=PPGENDER
recode fem 1=0 2=1 else=.

gen age=PPAGE


//Main Text Models
//F.N. 5 for forcefulness
reg forceful viol
reg forceful viol aggress violxaggress

//F.N. 7 for net effects
reg vote viol
reg contrib viol

//Table I
reg vote viol aggress violxaggress
reg vote viol aggress commitment aggressxcommitment violxaggress violxcommitment violxaggxcommit

//Table II
reg contrib viol aggress violxaggress
reg contrib viol aggress commitment aggressxcommitment violxaggress violxcommitment violxaggxcommit


//Online Supplement Models

//Figure A2 Histogram of Trait Aggression
histogram aggress, bin(10) percent ytitle(Percent) xtitle(Trait Aggression) xlabel(0(.2)1) scheme(s1mono)

//Table A1 Ordered Probit Voting Models
oprobit vote viol aggress commitment aggressxcommitment violxaggress violxcommitment violxaggxcommit, nolog

//Table A2 Ordered Probit Participation Models
oprobit contrib viol aggress commitment aggressxcommitment violxaggress violxcommitment violxaggxcommit, nolog

//Table A3 Disaggregated Motivations Voting Models
reg vote viol aggress pidstren aggressxpidstren violxaggress violxpidstren violxaggxpidstren
reg vote viol aggress electattn aggressxelectattn violxaggress violxelectattn violxaggxelectattn 

//Table A4 Disaggregated Motivations Voting Models
reg contrib viol aggress pidstren aggressxpidstren violxaggress violxpidstren violxaggxpidstren
reg contrib viol aggress electattn aggressxelectattn violxaggress violxelectattn violxaggxelectattn 

//Table A5 (nothing for Study 1)

//Table A6 Disaggregated Participation Outcomes Models
reg contrib viol aggress commitment aggressxcommitment violxaggress violxcommitment violxaggxcommit

//Table A7 Vote Models with Controls
reg vote viol aggress violxaggress edu income white fem age
reg vote viol aggress commitment aggressxcommitment violxaggress violxcommitment violxaggxcommit edu income white fem age

//NOTE: Do-files creating figures are uploaded separately.
//Figure 1, Figure 2, Figure A1
